package com.situ.day5;

public class Student extends Person{
	private String className;
	
	public Student() {
		super();//调用父类无参构造方法 Person()
	}

	public Student(int id, String name, int age, String className) {
		super(id, name, age);//调用父类有参构造方法 Person(id,name,age)
		this.className = className;
	}

	public void study() {
		
	}
	
	@Override  //重写、覆盖
	public void show() {
		//super.show();// new子类对象时候会将父类对象new出来，super代表的是父类对象
		System.out.println(className + "班的" + name + "年龄是" + age);
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}
}
